﻿using System;
using System.Collections;

namespace UwaySoft.EsheetServer.DataLayer
{
    public interface IRecordReader : IEnumerable, IDisposable
    {
        bool HasRecord();
        bool Read();
        void Close();

        bool ContainsField(string fieldName);
        bool IsNull(string fieldName);
        TField Get<TField>(string fieldName);
        object GetObject(string fieldName);
        bool GetBoolean(string fieldName);
        byte GetByte(string fieldName);
        DateTime GetDateTime(string fieldName);
        decimal GetDecimal(string fieldName);
        double GetDouble(string fieldName);
        float GetFloat(string fieldName);
        Guid GetGuid(string fieldName);
        short GetShort(string fieldName);
        int GetInt(string fieldName);
        long GetLong(string fieldName);
        string GetString(string fieldName);
    }
}